﻿using IdentityAtRest.Utility.Identity.Authorization;

namespace IdentityAtRest.Utility.Identity.Authorization
{
    public class AuthorizationDecision : IAuthorizationDecision
    {
        public AuthorizationDecision(string permission, bool authorized) : this(permission, authorized, "")
        {
        }

        public AuthorizationDecision(string permission, bool isAuthorized, string explanation)
        {
            Permission = permission;
            IsAuthorized = isAuthorized;
            Explanation = explanation;
        }

        public string Permission { get; private set; }
        public bool IsAuthorized { get; private set; }
        public string Explanation { get; private set; }
    }
}